fix(create-vite): update templates to use better font#11665
Merged
bluwy merged 2 commits intovitejs:mainfrom Jan 16, 2023
mayank99:main
Merged
fix(create-vite): update templates to use better font#11665bluwy merged 2 commits intovitejs:mainfrom mayank99:main
bluwy merged 2 commits intovitejs:mainfrom
mayank99:main
Conversation
bluwy
reviewed
Jan 12, 2023
bluwy
approved these changes
Jan 12, 2023
sapphi-red
approved these changes
Jan 16, 2023
Member
|
Thanks @mayank99! If you'd like, there's tons more to update at https://github.com/bluwy/create-vite-extra too. Otherwise I can also update them when I find the time. |
futurGH
pushed a commit
to futurGH/vite
that referenced
this pull request
Feb 26, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Hardcoding a pixel value for
font-sizeon the root element is bad for accessibility because it overrides user preferences (specified in browser/OS settings).16pxis already the default in all modern browsers, so I've removed it. For line-height, a unitless value is recommended, so I've used1.5(because 1.5 x 16 = 24). Any changes so far should be minimal.I know this is just a template that gets cleared by most devs. But even templates should encourage best practices; it's especially handy for new devs.
Unrelated: While I was there, I also added
system-uito the font stack. This is an OS-adaptive font that should look nice on every platform. I can undo this change if it's undesirable.Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).Ideally, include relevant tests that fail without this PR but pass with it.